package com.hfxt.service;

import com.github.pagehelper.PageInfo;
import com.hfxt.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

//@Transactional
public interface UserService {
    //登录
    User userLogin(String userName);

    //条件分页查询用户列表
    List<User> queryAllUsersByCondition(String userName, Integer userRole, Integer pageIndex, Integer pageSize);

    //条件分页 查询总记录数
    int queryCountByCondition(String userName, Integer userRole);

    //查询用户详细信息
    User queryUserById(Long id);

    //删除用户
    int deleteUserById(@Param("id") Long id);

    //批量删除用户
    int deleteUsersByList(List<Integer> list);

    //修改用户
    int updateUser(User user);

    //新增用户
    int addUser(User user);

    //查询所有用户
    List<User> queryAllUsers();

    //条件分页查询 PageHelper
    List<User> queryAllUsersByPageHelper(String userName, Integer userRole);

    //条件分页查询 PageHelper PageInfo
    PageInfo<User> queryAllUsersByPageInfo(String userName, Integer userRole,Integer pageNum,Integer pageSize);
}
